Release 10.1A: OpenEdge Getting Started:
Progress OpenEdge Studio


Detailed Order Line section procedure

The following sections lead you through assembling the Order Line section in more detail.

Adding a SmartFolder

In the Order Tracking System main window, the SmartWindow uses three logical pages (0, 1, and 2) to display SmartObjects. Logical pages control which SmartObjects are displayed at a given time. Objects on the default logical page, page 0, are always visible. The SmartFolder uses logical pages 1 and 2 for its tabs. The SmartFolder controls the display of SmartObjects on these pages by toggling their visibility depending on which tab is selected.

Note: A SmartFolder can only control the display of SmartObjects. A basic object, such as a text object or a rectangle, must be included in a SmartObject before a SmartFolder can control its display.

To add a SmartFolder:

  1. Choose the SmartFolder icon in the Object Palette.
  2. Position the SmartFolder near the left edge of the Order Line section in the window. The Progress Advisor notifies you that the SmartFolder should be a Page Source for some other SmartObject, and offers to create a Page SmartLink to the container (the SmartWindow):
  3. Choose OK. The folder appears in the design window:
  4. Resize and reposition the folder, as shown in the following figure:
  5. Click the SmartObject Instance menu, the square icon in the upper-left corner of the SmartFolder, and choose Instance Properties from the pop-up menu:
  6. In the SmartFolder Properties dialog box, insert the following tab labels:
  7. Tab
    Label
    1
    Browser
    2
    Detail

    The completed dialog box should look like this:

  8. Choose OK. The folder now contains two tabs with the labels you entered:
  9. Save your work.
Creating page 1 of the SmartFolder

Before you can add objects to the SmartFolder tabs, you must define logical pages for the tabs. In this instance, the Browser tab of the SmartFolder controls logical Page 1. When you add a logical page for a tab, you control which objects appear when that tab is selected.

To define logical pages for the SmartFolder:

  1. Choose the Procedure Settings icon in the AppBuilder toolbar to open the Procedure Settings dialog box:
  2. Choose the Pages icon to open the Pages dialog box:
  3. The page numbers begin with Page 0. Page 0 is the default (Main) page. Objects assigned to Page 0 are always displayed, regardless of which folder tab is selected. The objects that you added to the main window so far, such as dcust, dorder, and the SmartFolder itself, are all assigned to Page 0 by default.

  4. Choose Design to open the Design Page dialog box:
  5. Type 1 in the Page Number field and choose OK. Page 1 is now the current design page and is assigned to the Browser tab. Any objects that you add to the SmartWindow now display only when the Browser tab is selected.
  6. Choose the Start button on the Pages dialog box to open the Startup on Page dialog box:
  7. The value in the Page Number field determines which page, if any, displays in addition to Page 0 when the application first runs. In the SportsPro Order Tracking System, you want Page 1 to be the startup page so the SDB displaying the order lines appears at startup.

  8. Type 1 in the Page Number field and choose OK. Page 1 now displays at startup, along with the main page.
  9. Commit your changes to return to the main window. The Status Area of the AppBuilder indicates you are now working in Page 1:

The SmartFolder is now configured to control the display of other SmartObjects.

Adding a SDB to page 1 of the SmartFolder

Your next task is to add a SDB to Page 1, the Browser tab.

To add a SDB to page 1:

  1. Choose the SDB icon from the Object Palette to open the Choose SmartDataBrowser dialog box:
  2. Select bordlne2.w and choose OK.
  3. Place the SDB in the Browser tab. The Progress Advisor notifies you that the SDB instance, h_bordlne2, should be a Data Target for some other SmartObject, and offers to create a Data SmartLink from the SDO instance, h_dordlne.
  4. Select the radio button to create the SmartLink and choose OK. The Progress Advisor notifies you that the SDB instance, h_bordlne2, should be an Update Source for some other SmartObject, and offers to create an Update SmartLink to the SDO instance, h_dordlne.
  5. Select the radio button to create the SmartLink and choose OK.
  6. Position the SDB in the tab:

Now that you have built the Browser tab, you are ready to build the Detail tab.

Adding a SDV to page 2 of the SmartFolder

Before you add the SDV, vordlne, you must reset the current design page.

To specify design page 2 and add a SDV:

  1. Double-click the Page Number field in the Status Area of the AppBuilder. The Goto Page dialog box appears:
  2. Set the Display Page Number field to 2 and choose OK. The main window appears with the Detail tab selected.
  3. Choose the SDV icon in the Object Palette to open the Choose SmartDataViewer dialog box.
  4. Select vordlne.w and choose OK.
  5. Place the SDV in the Detail tab. The Progress Advisor notifies you that the SDV instance, h_vordlne, should be a Data Target for some other SmartObject, and offers to add a Data SmartLink from the SDO instance, h_dordlne.
  6. Select the radio button to create the SmartLink and choose OK.
  7. Position the SDV as shown:
Adding a Navigation SmartPanel

You now add the Navigation SmartPanel, pnavico, to the Detail tab.

To add a Navigation SmartPanel to the Detail tab:

  1. Right-click the SmartPanel icon on the Object Palette. A pop-up menu listing the available SmartPanels appears:
  2. Choose Navigation Panel (Icons) from the pop-up menu.
  3. Add the SmartPanel to the left of the SDV. The Progress Advisor notifies you that the SmartPanel, pnavico, should be a Navigation Source for some other SmartObject, and offers to add a Navigation SmartLink to one of the following SDO instances, h_dcust, h_dorder, or h_dordlne:
  4. Select the radio button to create the SmartLink to h_dordlne and choose OK:
  5. Save your work.

You have now assembled the main window of the SportsPro Order Tracking system using predefined objects. You should have a better understanding of how to use the OpenEdge Studio and AppBuilder to assemble SmartObject applications. Run your application and test the code you created.

If you have not already run the complete sample application, you might want to run it now. Running the application gives you an opportunity to see some of the other capabilities of SmartObjects. For information on running the application, see Chapter 2, " Working with the Sample Application."

If you would like to work more with SmartObjects, you can complete the exercises in Chapter 4, " Overview of SmartObject Technology." These exercises show how to fabricate SmartObject masters from templates installed with the product.


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095